package com.dao;

import com.vo.Emp;
import com.vo.Salgrade;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 * @author 鲁昊天
 * @date 2024/12/16
 */
public interface ISalgradeDAO {
    @Select("select * from salgrade")
    public List<Salgrade> selectAll() throws Exception;

    @Delete("delete from salgrade where grade = #{grade}")
    int delSalgrade(int grade);

    @Select("select * from salgrade where grade = #{grade}")
    Salgrade findSalgradeById(int grade);

    @Update("update salgrade set grade = #{grade}, num= #{num} where grade = #{grade}")
    int updateSalgrade(Salgrade salgrade);
}
